-- GENERATED SPELL FOR [Kirith the Damned] --


function spell0_7728(pUnit, Event) --@Mana Burn,Self--
pUnit:FullCastSpellOnTarget(12745,pUnit)
pUnit:RegisterEvent('Sorts_7728', 3000, 1)
end

function spell1_7728(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(12097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7728', 20250, 1)
end

function spell2_7728(pUnit, Event) --@Spirit of Kirith,Self--
pUnit:FullCastSpellOnTarget(10853,pUnit)
pUnit:RegisterEvent('Sorts_7728', 567, 1)
end

function Sorts_7728(pUnit, Event)
local choix_sorts_7728 = math.random(0, 2)
if choix_sorts_7728 == 0 then
pUnit:RegisterEvent('spell0_7728', 1, 1)
end
if choix_sorts_7728 == 1 then
pUnit:RegisterEvent('spell1_7728', 1, 1)
end
if choix_sorts_7728 == 2 then
pUnit:RegisterEvent('spell2_7728', 1, 1)
end
end

function mob7728_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7728', math.random(1500, 3000), 1)
end

function mob7728_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7728_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7728_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7728, 1, 'mob7728_Action')
RegisterUnitEvent(7728, 2, 'mob7728_Leave')
RegisterUnitEvent(7728, 3, 'mob7728_Kill')
RegisterUnitEvent(7728, 4, 'mob7728_Die')
